package bootpayservice.demo.controller;

import org.example.service.PayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.math.BigDecimal;

@Controller
@RequestMapping("pay")
public class PayController {

    @Autowired
    PayService payService;

    @GetMapping("get")
    @ResponseBody
    BigDecimal getAccount(@RequestParam("uid")Integer uid)
    {
        return payService.getAccount(uid);
    }
}
